home *** CD-ROM | disk | FTP | other *** search
- Path: dfw.nkn.net!usenet
- From: wiersch@fastlane.net (Albert Wiersch)
- Newsgroups: comp.lang.c++
- Subject: Help with Win95, & BC4.52
- Date: Fri, 16 Feb 1996 08:00:09 GMT
- Organization: National Knowledge Network
- Message-ID: <4g16bb$idt@dfw.nkn.net>
- NNTP-Posting-Host: fw47.fastlane.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have a problem and a question.
-
- #1. How do I change the focus on a dialog box. I want to be able to
- set the focus on a EDITTEXT box so the user does not have to TAB over
- to it or use the mouse to make it the focus... I want the function
- call I can issue to select this dialog control or any other as being
- the focus.
-
- #2... This crashes my program...
-
- case WM_INITDIALOG: // initialize Program Options Dialog Boc
- SetDlgItemText(hdwnd,DB1_FILENAME,p.defaultconffilename);
-
- if (p.checknesting) SendDlgItemMessage(hdwnd,DB1_CHECKNESTING,
- BM_SETCHECK,1,0); // set checkbox if checked
- if (p.alwaysnotepad) SendDlgItemMessage(hdwnd,DB1_NOTEPAD,
- BM_SETCHECK,1,0); // set checkbox if checked
- return 1;
-
- If I remove the SetDlgItemText command, there is no crash... but I
- need this command and I don't understand what is wrong with it.
- p.defaultname is an array of 256 chars. If I move it to another case
- statement, it seems to work. It says stack fault in kernel32.dll when
- I list the details of the crash.
-
-
- Please send any help you can offer to me in email. I would really
- appreciate it.
-
- Regards,
- Albert Wiersch
- METRO 817-589-9600
- wiersch@fastlane.net
- http://www.fastlane.net/~wiersch
-
-